﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="insertUser.ascx.cs" Inherits="admin_insertUser" %>
<%@ Register TagPrefix="ew" Namespace="eWorld.UI" Assembly="eWorld.UI" %>
<table cellspacing="0" cellpadding="2" style="width:100%;" class="cssTable" border="0">
	<tr>
		<td class="cssPageTitleBG" colspan="6">
		    <asp:label id="lblUser" runat="server" CssClass="cssPageTitle" Text="Quản lý tài khoản người dùng"/>
		</td>
	</tr>
	<tr>
		<td colspan="6">
		    <asp:validationsummary id="vdsCategory" runat="server" CssClass="cssManField" Font-Bold="true" />
		   <asp:label id="lblMess" runat="server" CssClass="cssManField" />
		</td>
	</tr>
	<tr>
		<td align="right" style="width:15%;">
			<asp:label id="lblFullName" CssClass="cssManField" runat="server" Text="<U>H</U>ọ và tên:" />
		</td>
		<td style="width:30%;">
			<asp:textbox id="txtFullName" accessKey="e" CssClass="cssTextBox"  runat="server" MaxLength="64" Width="96%" />
		</td>
		<td style="width:5%;"> </td>
		<td align="right" style="width:15%;">
		    <asp:label id="lblQuestion" runat="server" CssClass="cssManField" Text="<U>T</U>ên đăng nhập:" />
		</td>
		<td align="left" style="width:30%;">
		    <asp:textbox id="txtUserName" accessKey="t" runat="server" CssClass="cssTextBox"  Width="96%" MaxLength="32" />
		</td>
		<td style="width:5%;">
		    <asp:customvalidator id="ctvUserName" runat="server" Display="Static" ErrorMessage="Bạn phải nhập tên đăng nhập" ControlToValidate="txtUserName" Text="*" />
		</td>
	</tr>
	<tr>
		<td align="right" >
		    <asp:label id="lblAnswer" runat="server" CssClass="cssManField" Text="<U>M</U>ật khẩu mới:" />
		</td>
		<td align="left">
		    <asp:textbox id="txtPassWord" accessKey="m" runat="server" CssClass="cssTextBox"  Width="96%" TextMode="Password" />
		</td>
		<td >
			<asp:customvalidator id="ctvPassword" runat="server" ControlToValidate="txtPassWord" ErrorMessage="Bạn phải nhập mật khẩu" Display="Static" Text="*" />
		</td>
		<td align="right">
		    <asp:label id="Label1" runat="server" CssClass="cssManField" Text="<U>N</U>hập lại mật khẩu mới:" />
		</td>
		<td align="left">
		    <asp:textbox id="txtRePassWord" accessKey="m" runat="server" CssClass="cssTextBox" Width="96%" TextMode="Password" />
		</td>
		<td>
		    <asp:customvalidator id="ctvRePassword" runat="server" ControlToValidate="txtRePassWord" ErrorMessage="Bạn phải nhập phân nhập lại mật khẩu" Display="Static" Text="*" />
			<asp:comparevalidator id="cpvRePassWord" runat="server" ControlToValidate="txtRePassWord" ErrorMessage="Mật khẩu nhập lại không hợp lệ"	Display="Static" ControlToCompare="txtPassWord" Text="*" />
		</td>
	</tr>
	<tr>
		<td align="right">
			<asp:label id="Label4" CssClass="cssManField" runat="server" Text="<U>Q</U>uyền:"/>
		</td>
		<td valign="top" colspan="5">
		    <asp:DropDownList id="ddlNhomID" runat="server"  />
	    </td>
	</tr>	
	<tr>
    <td></td>
	    <td>
			<asp:button id="btnInsert0" accessKey="c" CssClass="cssButton" runat="server"  
                Width="98px" Text="Tìm Kiếm" OnClick="btnTimKiem_Click" /></td>
        <td>
            &nbsp;</td>  
		<td colspan="5" align="left">
			<asp:button id="btnInsert" accessKey="c" CssClass="cssButton" runat="server"  Width="98px" Text="Tạo mới(c)" OnClick="btnInsert_Click" />&nbsp;
			<asp:button id="btnUpdate" accessKey="c" CssClass="cssButton" runat="server" Width="98px" Text="Sửa(s)" OnClick="btnUpdate_Click" />&nbsp;
			<asp:button id="btnCancel" accessKey="r" CssClass="cssButton" runat="server" Width="98px" Text="Xóa trắng(r)" OnClick="btnCancel_Click" />
		</td>
	</tr>
	<tr>
		<td align="center" colspan="6" style="height:450px;" valign="top">
		    <asp:GridView id="grvUser" runat="server" Width="100%" CellPadding="0" CellSpacing="0" 
		        AutoGenerateColumns="False" AllowPaging="true" EmptyDataText="Không tìm thấy dữ liệu"
                EmptyDataRowStyle-ForeColor="Blue" EmptyDataRowStyle-HorizontalAlign="Center"
                HeaderStyle-CssClass="cssGridHeader" EditRowStyle-CssClass="cssGridEdit" RowStyle-CssClass="cssGridCell" 
		        AlternatingRowStyle-CssClass="cssGridAlterCell" 
                PagerStyle-CssClass="cssGridPager" SelectedRowStyle-CssClass="cssSelectedRow"
				OnRowDataBound="grvUser_RowDataBound" OnRowDeleting="grvUser_RowDeleting" OnRowEditing="grvUser_RowEditing"
				DataKeyNames="ID" PageSize="15" onpageindexchanging="grvUser_PageIndexChanging" >				
                <RowStyle CssClass="cssGridCell"></RowStyle>
                 <PagerSettings Position="TopAndBottom" />
				<Columns>
					<asp:TemplateField Visible="False">
						<ItemTemplate>
							<asp:Label id="lblUserID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ID") %>' />
						</ItemTemplate>
					</asp:TemplateField>
					<asp:BoundField DataField="Seq" ReadOnly="true" HeaderText="TT">
						<ItemStyle HorizontalAlign="Right" Width="4%"></ItemStyle>
					</asp:BoundField>	
					<asp:TemplateField HeaderText="Tên đăng nhập" ItemStyle-Width="17%">
						<ItemTemplate>
							<asp:Label id="Label2" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.TenDangNhap") %>' />
						</ItemTemplate>

                <ItemStyle Width="17%"></ItemStyle>
					</asp:TemplateField>					
					<asp:TemplateField HeaderText="Họ tên">
						<ItemTemplate>
							<asp:Label id="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.HoTen") %>' />
						</ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="Sửa" HeaderStyle-HorizontalAlign="Center">

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>

						<ItemStyle HorizontalAlign="Center" Width="7%"></ItemStyle>
						<ItemTemplate>
							<asp:ImageButton id="lbtEdit" runat="server" ImageUrl="~/images/Button/Edit.gif" ToolTip="Sửa mục từ" CommandName="Edit" />
						</ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="Xóa" HeaderStyle-HorizontalAlign="Center">

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>

						<ItemStyle HorizontalAlign="Center" Width="7%"></ItemStyle>
						<ItemTemplate>
							<asp:ImageButton id="lbtDelete" runat="server" ImageUrl="~/images/Button/Delete.gif" ToolTip="Xóa bản ghi" CommandName="Delete" />
						</ItemTemplate>
					</asp:TemplateField>					
				</Columns>

<PagerStyle CssClass="cssGridPager" HorizontalAlign="Center" VerticalAlign="Middle"></PagerStyle>

<SelectedRowStyle CssClass="cssSelectedRow"></SelectedRowStyle>

<HeaderStyle CssClass="cssGridHeader"></HeaderStyle>

<EditRowStyle CssClass="cssGridEdit"></EditRowStyle>

<AlternatingRowStyle CssClass="cssGridAlterCell"></AlternatingRowStyle>
			</asp:GridView></td>
	</tr>	
</table>
<input id="hdfUserID" type="hidden" name="hdfUserID" runat="server">
